﻿namespace Northwind.ViewModel
{
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using GalaSoft.MvvmLight.Command;
    using Northwind.ViewModel.Enumerations;

    public class OrderWizardCustomerViewModel : CustomerSearchBoxViewModel, IOrderWizardChildViewModel
    {
        WizardChildFlow _showSibling;
        public WizardChildFlow ShowSibling
        {
            get
            {
                return _showSibling;
            }
            set
            {
                _showSibling = value;
                RaisePropertyChanged("ShowSibling");
            }
        }

        RelayCommand _showNextWizardChild;
        public RelayCommand ShowNextWizardChild
        {
            get
            {
                if (_showNextWizardChild == null)
                {
                    _showNextWizardChild = new RelayCommand(
                        () => { ShowSibling = WizardChildFlow.ShowNextChild; },
                        () => this.SelectedCustomer != null);
                }
                return _showNextWizardChild;
            }
        }

        //RelayCommand _showPreviousWizardChild;
        public RelayCommand ShowPreviousWizardChild
        {
            get
            {
                return null;
                //if (_showPreviousWizardChild == null)
                //{
                //    _showPreviousWizardChild = new RelayCommand(
                //        () => { ShowSibling = WizardChildFlow.ShowPreviousChild; },
                //        () => false);
                //}

                //return _showPreviousWizardChild;

            }
        }
    }
}

